package cn.ssm.petadopt.mapper;

import cn.ssm.petadopt.entity.Admins;
import cn.ssm.petadopt.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @Autheor: Sun俊仪
 * @Date: 2022 2022/12/17 14:21
 * @Name: PetSystem
 */
public interface AdminsMapper {


    Admins selectAdminByAdminName(String adminName);

    List<Admins> selectPage(Admins admins);

    Integer updateA(Admins admin);

    @Update("update admins set adminPwd = #{adminPwd} where adminName = #{adminName}")
    Integer updatePwd(Admins admin);

    Integer uploadPic(Admins admin);

    @Insert("insert into admins (adminName,realName,adminPwd,sex,telephone,email,birthday,remark) values (#{adminName},#{realName},#{adminPwd},#{sex},#{telephone},#{email},#{birthday},#{remark})")
    Integer addOneAdmin(Admins admin);

    @Select("select * from admins where id = #{id}")
    Admins selectAdminById(Integer id);
}
